import type {ThemeDefinition} from 'vuetify'

/**
 * vuetifyjs加载插件
 * https://vuetifyjs.com/
 */
export default defineNuxtPlugin((nuxtApp) => {
    //定义主题
    const customTheme: ThemeDefinition = {
        dark: false,
       /* colors: {
            background: '#FFFFFF',
            surface: '#FFFFFF',
            primary: '#62E71FFF',
            secondary: '#FFFFFF',
            error: '#D00B0BFF',
            info: '#FF9933',
            success: '#82CE3EFF',
            warning: '#FF3385FF',
        },
        variables: {
            'border-color': '#FFFFFF',
            'border-opacity': 0.12,
            'high-emphasis-opacity': 0.87,
            'medium-emphasis-opacity': 0.60,
            'disabled-opacity': 0.38,
            'idle-opacity': 0.04,
            'hover-opacity': 0.04,
            'focus-opacity': 0.12,
            'selected-opacity': 0.08,
            'activated-opacity': 0.12,
            'pressed-opacity': 0.12,
            'dragged-opacity': 0.08,
            'theme-kbd': '#000000',
            'theme-on-kbd': '#000000',
            'theme-code': '#000000',
            'theme-on-code': '#000000',
        }*/
    }
    //加载主题
    nuxtApp.hook('vuetify:before-create', ({vuetifyOptions}) => {
        vuetifyOptions.theme = {
            defaultTheme: 'customTheme',
            themes: {
                customTheme,
            }
        };
    })
})